import javax.swing.*;
import java.awt.*;

public class btnRedCommand extends JMenuItem implements Command {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JPanel panel; 
    private Color color;
    
    //definim un constructor implicit cu argumente
    public btnRedCommand(JPanel panel,Color color) 
    {
        this.panel=panel; 
        this.color=color;
    }

    public void execute()
    {
        this.panel.setBackground(this.color); //metoda pt colorarea panelului
    }

}
